#include <iostream>
#include <iomanip>
#include <bitset>
using namespace std;

void disp(int a, int b)
{
    cout << endl;
    cout << showbase;
    cout << hex;
    cout << setw(16) << a << endl;
    cout << setw(16) << b << endl;
    cout << endl;
}

void swap(int& a , int& b)
{

    disp(a,b);
    a = a ^ b;    disp(a,b);
    b = a ^ b;    disp(a, b);
    a = a ^ b;    disp (a,b);
}

int main()
{
    int a = 102;
    int b = 123;
    swap(a,b);
}

